In a distributed switching and routing system, forwarding chips are responsible for packet forwarding processing. After a network device virtualizing technique is implemented, any number of forwarding chips may be virtualized into one or more Virtual Devices (VDs). From a user's perspective, each VD acts as an independent network switch, having its own, independent, routing process, layer-2 and layer-3 protocols, forwarding table items, and ports. Each VD is capable of adding its own users, capable of being restarted and reading its own configuration file. Resources may be allocated and managed between VDs via commands and they do not impact each other Forwarding traffic of the VDs is isolated from each other, and each user port of each VD is invisible to other VDs.